<?php
include("../inc/global.inc");
include("../inc/page.php");
$hover=1;
$url="list.php";
$thepage=$_GET['page']?$_GET['page']:1;
$maxpage=20;
$l_rs=@mysql_query("select * from news_type where id='".$_GET['id']."'");
$l_row=@mysql_fetch_array($l_rs);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$l_row[type_name]?>，三帝贸易网资讯中心提供最新行业资讯</title>
<link href="/css/body.css" rel="stylesheet" type="text/css" />
<link href="/css/head.css" rel="stylesheet" type="text/css" />
<link href="/css/foot.css" rel="stylesheet" type="text/css" />
<link href="/expo/css/list.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php include("../inc/head_top.php")?>
<?php include("../inc/index_search.php")?>
<?php include("../inc/menu.php");?>
<div id="mian" class="topside6 side">
<div class="title1">当前位置: <a href="/">三帝贸易网</a> >> <?=$l_row[type_name]?></div>
<div class="onl"></div>
</div>
<div class="w960 topside20 side">
<script type="text/javascript">/*960*90，创建于2011-3-9*/ var cpro_id = 'u403357';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
<div class="onl"></div>
</div>
<div id="mian" class="topside6">

  
<div class="leftmain content sideyellow1">
  <div class="biaoti">
<div class="title3 size14"><?=$l_row[type_name]?>列表</div>
  <ul class="newslist">
<?php
	 $rs=@mysql_query("select id,news_time,news_title from news where type_id='".$_GET['id']."' and n_sh=1 order by id desc limit ".($thepage-1)*$maxpage.",$maxpage");
	 while($row=@mysql_fetch_array($rs)){
	 ?>
     <li><span><?=date("Y-m-d",strtotime($row[news_time]))?></span><a href="/article/<?=date("Y-m-d",strtotime($row[news_time]))?>/<?=$row['id']?>.html" target="_blank"><?=mb_substr($row[news_title],0,30,'utf-8')?></a></li>
<?php }
$rs2=@mysql_query("select count(id) from news where type_id='".$_GET['id']."' and n_sh=1");
$totalrecord=@mysql_result($rs2,0); 
$totalpage=ceil($totalrecord/$maxpage);
@mysql_free_result($rs2);
?>
  </ul>
<div class="page">
<div class="pageleft">
<ul>
<?php pages($thepage,$totalpage,$maxpage,5);?>
</ul>
</div>
<div class="pageright">
<form name="pageform" method="post" action="" onSubmit="return onCheckPage()"> 
共<?=$totalpage?>页　到
<input type="text" name="page" class="input-txt" size="5" maxlength="5">页
<input type="submit" value="确定" class="but">
</form>
<script language="javascript"> 
function onCheckPage(){
var page = parseInt(document.pageform.page.value); 
if(isNaN(page)){
alert("请输入数字(1,<?=$totalpage?>)");
return false; 
}
if(page<=0){
page =1; 
}
if(page ><?=$totalpage?>){
page=<?=$totalpage?>;
}
if(page>1){
document.pageform.action = "/article-list/<?=$_GET[id]?>/"+page+".html"; 
}else{
document.pageform.action = "/article-list/<?=$_GET[id]?>/1.html";
}
return true;
}
</script>
  </div>
<div class="onl"></div>
</div>
  </div>
  </div>
  
<div class="rightbox downside6">

<div class="rightmain downside6 side">
<div class="title size14 b"><strong>三帝资料</strong></div>
 <div class="RtInfo4">
<div class="div_3">
<ul>
<?php
$rs=@mysql_query("select * from ziliao where z_sh=1  order by id asc limit 12");
while($row=@mysql_fetch_array($rs)){?>
<li><a href="http://zl.sandib2b.cn/ziliao-info/<?=$row['id']?>.html" target="_blank"><?=mb_substr($row[z_title],0,17,'utf-8')?></a></li>
<?php }?>
</ul>
</div>
 </div>
 <div class="onl"></div> 
</div>

  <div class="rightmain">
    <div class="title size14 b">最新展会</div>
    <div class="RtInfo4">
      <div class="div_3">
        <ul>
<?php
$rs=@mysql_query("select id,news_time,news_title from news where (type_id2=27 or type_id2=28) and n_sh=1 order by id desc limit 10");
while($row=@mysql_fetch_array($rs)){
?>
<li><a href="/expo/<?=date("Y-m-d",strtotime($row[news_time]))?>/<?=$row['id']?>.html" target="_blank"><?=mb_substr($row[news_title],0,18,'utf-8')?></a></li><?php }?>
          </ul>
      </div>
    </div>
    <div class="onl"></div>
  </div>
</div>

  
<div class="onl"></div>
</div>
<div class="w960 topside20 downside20 side">
<script type="text/javascript">/*960*90，创建于2011-3-9*/ var cpro_id = 'u403357';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
<div class="onl"></div>
</div><?php
include("../inc/foot.php");
?>
</BODY>
</HTML>
